import java.util.BitSet;



public class VisitedEntry
{
	
//	static class BoolArrayBitSet
//	{
//		private BitSet bitSet;
//		private int yOffset;
//		
//		private BoolArrayBitSet( int xWidth, int yHeight )
//		{
//			bitSet = new BitSet( xWidth*yHeight );
//			yOffset = yHeight;
//		}
//		
//		private int convertXYIntoOffset( int x, int y )
//		{
//			return x+(y*yOffset);
//		}
//		
//		void set( int x, int y, boolean value )
//		{
//			bitSet.set( convertXYIntoOffset(x,y) , value);
//		}
//		
//		boolean get( int x, int y )
//		{
//			return bitSet.get( convertXYIntoOffset(x,y) );
//		}
//	}
	
	@Override
	public int hashCode() 
	{
		return hashCode;
	}

	@Override
	public boolean equals(Object obj) 
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		VisitedEntry other = (VisitedEntry) obj;
		if (hashCode != other.hashCode)
			return false;
		return true;
	}

	int hashCode;
	Move.Direction direction;	
	
	
	
	VisitedEntry lastEntryPointer;
	
//	BoolArrayBitSet playerVisited;
	
	public VisitedEntry( int hashCode, Move.Direction direction)
	{
		this( hashCode, direction, null );
	}
	
	public VisitedEntry( int hashCode, Move.Direction direction, VisitedEntry lastEntryPointer )
	{
		this.hashCode = hashCode;
		this.direction = direction;
		this.lastEntryPointer = lastEntryPointer;
		
//		playerVisited = new BoolArrayBitSet(boardXWidth, boardYHeight);
	}
	
//	public boolean playerHasVisited( int x, int y )
//	{
//		return playerVisited.get(x, y);
//	}
//	
//	public void setPlayerHasVisited( int x, int y )
//	{
//		playerVisited.set(x, y, true);
//	}
	
}